<?php
echo "Test System_Semaphore Begin";

/**
 * Case 1:test the param of System_Semaphore::get
 */
try{
    $id = System_Semaphore::get('aaa');
    echo "Case1:Failed\r\n";
    System_Semaphore::remove($id); 
}catch(System_Exception $e){
    echo "Case1:Pass {$e->getMessage()}\r\n";
}

try{
    $id = System_Semaphore::get(12.3);
    echo "Case1:Failed\r\n";
    System_Semaphore::remove($id); 
}catch(System_Exception $e){
    echo "Case1:Pass {$e->getMessage()}\r\n";
}

try{
    $id = System_Semaphore::get(array('asdf'));
    echo "Case1:Failed\r\n";
    System_Semaphore::remove($id); 
}catch(System_Exception $e){
    echo "Case1:Pass {$e->getMessage()}\r\n";
}

try{
    $id = System_Semaphore::get(12);
    echo "Case1:Pass\r\n";
    System_Semaphore::remove($id); 
}catch(System_Exception $e){
    echo "Case1:Failed {$e->getMessage()}\r\n";
}

echo "Test System_Semaphore End";